<%= form_for @changeset, @action, fn f -> %>
  <%= if @changeset.action do %>
    <div class="alert alert-danger">
      <p>Oops, something went wrong! Please check the errors below.</p>
    </div>
  <% end %>
  {label(f, :name)}
  {text_input(f, :name)}
  {error_tag(f, :name)}
  {label(f, :redirect_uri)}
  {textarea(f, :redirect_uri)}
  {error_tag(f, :redirect_uri)}
  <span class="help-block">Use one line per URI</span>
  <span class="help-block">
    Use <code>{ExOauth2Provider.Config.native_redirect_uri([])}</code> for local tests
  </span>
  {label(f, :scopes)}
  {text_input(f, :scopes)}
  {error_tag(f, :scopes)}
  <span class="help-block">
    Separate scopes with spaces. Leave blank to use the default scopes.
  </span>
  <div>
    {submit("Save")}
  </div>
<% end %>
